import request from '@/utils/request'

export const getShopAllTypes = () =>
    request({
        url: "/shops/types",
        method: 'get'
    })

export const getSeachShop = (data: any) =>
    request({
        url: "/shops/shops",
        method: 'post',
        data
    })

export const addShop = (data: any) =>
    request({
        url: "/shops/addshop",
        method: 'post',
        data
    })

export const deleteShop = (id:Number) =>
    request({
        url: `/shops/deleteshop/${id}`,
        method: 'delete'
    })

export const updateShop = (data: any) =>
    request({
        url: "/shops/updateshop",
        method: 'put',
        data
    })

export const downloadShopPic = (id:Number) =>
    request({
        url: `/shops/downloadShopPic/${id}`,
        method: 'post',
        responseType:'blob', //读取二进制数据
})
